home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / DynConnectMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  2.5 KB  |  87 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  13 April 1997
  22. // Author:         gf
  23. //
  24. //
  25. //  Procedure Name:
  26. //      DynConnectMenu
  27. //
  28. //  Description:
  29. //        Create the DYNAMICS->Connect
  30. //
  31. //  Input Arguments:
  32. //      parent to parent the menu to.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38.  
  39. global proc DynConnectMenu( string $parent )
  40. {
  41.     setParent -m $parent;
  42.     if( `menu -q -ni $parent` != 0 ) {
  43.         //
  44.         //    Menu is built already - just return
  45.         //
  46.         return;
  47.     }
  48.  
  49.     menuItem -l "Connect to Field" 
  50.         -annotation "Connect Field: Select objects to be affected, then select the field"
  51.         -c "performDynamicsConnect 1"
  52.         -i "connectField.xpm"
  53.         connFieldItem;
  54.     menuItem -l "Connect to Emitter" 
  55.         -annotation "Connect Emitter: Select objects to be affected, then select the emitter"
  56.         -c "performDynamicsConnect 2"
  57.         -i "connectEmit.xpm"
  58.         connEmitItem;
  59.     menuItem -l "Connect to Collision" 
  60.         -annotation "Connect Collision: Select particle objects to collide, then select geometry to collide with"
  61.         -c "performDynamicsConnect 3"
  62.         -i "connectCollision.xpm"
  63.         connCollItem;
  64.  
  65.     menuItem -d true;
  66.  
  67.  
  68.     menuItem -l "Add to Owner" 
  69.         -annotation "Add to Owner: Select field/emitter/collision, then select owner"
  70.         -c "addDynamic"
  71.         addDynamicItem;
  72.  
  73.     menuItem -d true;
  74.  
  75.     menuItem -l "Connect to Time" 
  76.         -annotation "Connect to Time: Select particle shape"
  77.         -c "dynConnectToTime"
  78.         connectToTimeItem;
  79.  
  80.     int $dynamicsIsLicensed = `licenseCheck -mode "edit" -type "fx"`;
  81.     if (!$dynamicsIsLicensed)
  82.     {
  83.          menuItem -e -enable false connEmitItem;
  84.          menuItem -e -enable false connCollItem;
  85.     }
  86. }
  87.